{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e53f1736",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f3fcac50",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "        <script type=\"text/javascript\">\n",
       "        window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
       "        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
       "        if (typeof require !== 'undefined') {\n",
       "        require.undef(\"plotly\");\n",
       "        requirejs.config({\n",
       "            paths: {\n",
       "                'plotly': ['https://cdn.plot.ly/plotly-2.3.1.min']\n",
       "            }\n",
       "        });\n",
       "        require(['plotly'], function(Plotly) {\n",
       "            window._Plotly = Plotly;\n",
       "        });\n",
       "        }\n",
       "        </script>\n",
       "        "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import plotly\n",
    "import plotly.graph_objs as go\n",
    "import pandas as pd\n",
    "from datetime import datetime\n",
    "plotly.offline.init_notebook_mode(connected=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "a0506a43",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "linkText": "Export to plot.ly",
        "plotlyServerURL": "https://plot.ly",
        "showLink": false
       },
       "data": [
        {
         "close": [
          14.1,
          13.74,
          13.35,
          13.37,
          13.54,
          14.38,
          14.52,
          15.12,
          14.89,
          14.97,
          14.94,
          14.9,
          14.92,
          14.99,
          14.45,
          14.31,
          14.65,
          14.25,
          14.31,
          14.27,
          14.13,
          14.16,
          14.45,
          14.3,
          14.44,
          14.58,
          14.81,
          14.69,
          14.55,
          14.56,
          14.68,
          14.45,
          14.24,
          14.41,
          14.84,
          15.34,
          15.38,
          15.18,
          15.75,
          15.71,
          15.9,
          15.59,
          16.2,
          16.25,
          16.24,
          16.81,
          17.22,
          17.18,
          16.79,
          16.7,
          16.51,
          16.89,
          16.42,
          16.45,
          16.87,
          16.88,
          16.66,
          16.91,
          16.43,
          16.26,
          16.86,
          16.92,
          17.15,
          16.96,
          16.89,
          16.65,
          16.28,
          16.33,
          16.33,
          16.32,
          16.34,
          16.45,
          16.41,
          15.85,
          15.86,
          15.59,
          15.8,
          15.62,
          15.47,
          15.49,
          15.29,
          15.36,
          15.45,
          15.31,
          15.43,
          15.6,
          15.41,
          15.33,
          15.66,
          15.6,
          16.12,
          16.13,
          16.5,
          16.46,
          16.55,
          16.59,
          16.24,
          16.4,
          16.3,
          16.47,
          16.63,
          16.57,
          16.45,
          16.87,
          17.18,
          17.07,
          17.15,
          16.66,
          16.79,
          16.69,
          16.99,
          16.76,
          16.52,
          16.33,
          16.39,
          16.45,
          16,
          16.09,
          15.54,
          13.99,
          14.6,
          14.63,
          14.77,
          14.62,
          14.5,
          14.79,
          14.77,
          14.65,
          15.03,
          15.37,
          15.2,
          15.24,
          15.59,
          15.58,
          15.23,
          15.04,
          14.99,
          15.11,
          14.5,
          14.79,
          14.72,
          14.69,
          15.39,
          15.03,
          14.45,
          14.76,
          14.69,
          14.68,
          14.52,
          13.75,
          13.41,
          12.71,
          12.23,
          12.52,
          12.15,
          12.61,
          12.87,
          13.06,
          13.15,
          12.94,
          12.8,
          12.89,
          12.97
         ],
         "high": [
          14.19,
          13.88,
          13.64,
          13.46,
          13.64,
          14.5,
          14.85,
          15.12,
          15.08,
          15.22,
          14.96,
          15.14,
          14.94,
          15.2,
          14.89,
          14.45,
          14.74,
          14.5,
          14.48,
          14.28,
          14.24,
          14.39,
          14.5,
          14.51,
          14.5,
          14.85,
          14.81,
          15,
          14.64,
          14.71,
          14.78,
          14.72,
          14.45,
          14.48,
          14.89,
          15.4,
          15.47,
          15.54,
          15.85,
          16.04,
          16,
          15.89,
          16.23,
          16.52,
          16.27,
          16.95,
          17.6,
          17.35,
          17.44,
          17,
          17.04,
          16.97,
          16.93,
          16.67,
          17,
          16.96,
          17.04,
          16.93,
          16.96,
          16.47,
          17,
          17.25,
          17.44,
          17.26,
          17.07,
          17.02,
          16.53,
          16.37,
          16.46,
          16.48,
          16.55,
          16.55,
          16.48,
          16.3,
          15.87,
          15.92,
          15.84,
          15.89,
          15.64,
          15.54,
          15.55,
          15.43,
          15.46,
          15.41,
          15.48,
          15.72,
          15.62,
          15.38,
          15.68,
          15.67,
          16.12,
          16.14,
          16.63,
          16.66,
          16.74,
          16.68,
          16.68,
          16.5,
          16.56,
          16.48,
          16.93,
          16.63,
          16.63,
          16.95,
          17.31,
          17.34,
          17.28,
          17.05,
          16.93,
          16.81,
          17.03,
          17.27,
          16.86,
          16.57,
          16.55,
          16.61,
          16.34,
          16.16,
          15.92,
          14.7,
          14.66,
          14.89,
          14.87,
          14.69,
          14.53,
          14.94,
          14.82,
          14.88,
          15.14,
          15.37,
          15.33,
          15.37,
          15.62,
          15.72,
          15.46,
          15.13,
          15.27,
          15.15,
          15.04,
          14.95,
          14.99,
          14.78,
          15.64,
          15.27,
          14.73,
          14.85,
          14.88,
          14.84,
          14.58,
          14.46,
          13.97,
          13.55,
          12.74,
          12.68,
          12.35,
          12.68,
          13.07,
          13.34,
          13.38,
          13.04,
          13.09,
          13.13,
          12.97
         ],
         "low": [
          13.94,
          13.66,
          13.27,
          13.03,
          13.37,
          13.85,
          14.43,
          14.6,
          14.74,
          14.8,
          14.6,
          14.78,
          14.52,
          14.77,
          14.38,
          14.2,
          14.35,
          14.15,
          14.24,
          14.05,
          14.08,
          14.1,
          14.11,
          14.25,
          14.31,
          14.55,
          14.62,
          14.6,
          14.41,
          14.46,
          14.53,
          14.4,
          14.18,
          14.24,
          14.48,
          14.93,
          15.18,
          15.18,
          15.19,
          15.66,
          15.7,
          15.57,
          15.6,
          16.02,
          15.99,
          16.2,
          16.92,
          16.82,
          16.63,
          16.55,
          16.43,
          16.43,
          16.03,
          16.23,
          16.44,
          16.58,
          16.48,
          16.56,
          16.42,
          16.24,
          16.28,
          16.77,
          16.79,
          16.88,
          16.75,
          16.64,
          16.2,
          16.16,
          16.06,
          16.25,
          16.24,
          16.23,
          16.31,
          15.77,
          15.63,
          15.55,
          15.54,
          15.49,
          15.39,
          15.44,
          15.18,
          15.23,
          15.21,
          15.21,
          15.3,
          15.46,
          15.35,
          15.25,
          15.3,
          15.53,
          15.77,
          15.87,
          15.98,
          16.41,
          16.44,
          16.44,
          16.17,
          16.23,
          16.24,
          16.32,
          16.43,
          16.1,
          16.31,
          16.55,
          16.92,
          16.91,
          16.95,
          16.63,
          16.53,
          16.52,
          16.61,
          16.76,
          16.45,
          16.2,
          16.35,
          16.35,
          15.93,
          15.71,
          15.39,
          13.99,
          14.02,
          14.32,
          14.51,
          14.41,
          14.3,
          14.56,
          14.6,
          14.61,
          14.7,
          14.93,
          15.01,
          15.08,
          15.1,
          15.45,
          15.15,
          14.78,
          14.7,
          14.89,
          14.46,
          14.46,
          14.63,
          14.51,
          14.73,
          15.02,
          14.42,
          14.38,
          14.62,
          14.53,
          13.9,
          13.75,
          13.13,
          12.65,
          11.91,
          12.26,
          11.93,
          12.27,
          12.7,
          12.72,
          13.08,
          12.76,
          12.78,
          12.82,
          12.66
         ],
         "open": [
          14.06,
          13.77,
          13.6,
          13.1,
          13.49,
          13.9,
          14.55,
          14.61,
          15,
          15.14,
          14.64,
          15.09,
          14.91,
          14.92,
          14.87,
          14.4,
          14.37,
          14.42,
          14.36,
          14.26,
          14.22,
          14.29,
          14.15,
          14.48,
          14.32,
          14.56,
          14.71,
          14.98,
          14.6,
          14.6,
          14.66,
          14.7,
          14.36,
          14.24,
          14.48,
          14.95,
          15.34,
          15.47,
          15.2,
          15.86,
          15.85,
          15.75,
          15.6,
          16.1,
          16.27,
          16.2,
          16.97,
          17.25,
          17.26,
          16.9,
          16.8,
          16.43,
          16.91,
          16.32,
          16.5,
          16.78,
          16.98,
          16.69,
          16.8,
          16.42,
          16.35,
          16.98,
          16.8,
          17.06,
          16.93,
          16.98,
          16.5,
          16.29,
          16.29,
          16.43,
          16.39,
          16.35,
          16.45,
          16.3,
          15.75,
          15.89,
          15.64,
          15.89,
          15.64,
          15.47,
          15.54,
          15.35,
          15.3,
          15.34,
          15.35,
          15.47,
          15.62,
          15.36,
          15.38,
          15.66,
          15.85,
          16.12,
          16,
          16.43,
          16.55,
          16.55,
          16.68,
          16.23,
          16.45,
          16.34,
          16.53,
          16.46,
          16.57,
          16.65,
          16.94,
          17.01,
          17.13,
          17,
          16.81,
          16.79,
          16.75,
          16.99,
          16.79,
          16.52,
          16.38,
          16.43,
          16.34,
          15.92,
          15.92,
          13.99,
          14.05,
          14.59,
          14.81,
          14.6,
          14.51,
          14.6,
          14.79,
          14.71,
          14.75,
          15.04,
          15.33,
          15.1,
          15.27,
          15.49,
          15.46,
          15,
          14.77,
          14.96,
          14.85,
          14.55,
          14.96,
          14.68,
          14.8,
          15.18,
          14.71,
          14.38,
          14.77,
          14.65,
          13.9,
          14.45,
          13.75,
          13.41,
          12.68,
          12.4,
          12,
          12.4,
          12.88,
          12.78,
          13.25,
          12.85,
          13.05,
          12.86,
          12.75
         ],
         "type": "ohlc",
         "x": [
          20190801,
          20190802,
          20190805,
          20190806,
          20190807,
          20190808,
          20190809,
          20190812,
          20190813,
          20190814,
          20190815,
          20190816,
          20190819,
          20190820,
          20190821,
          20190822,
          20190823,
          20190826,
          20190827,
          20190828,
          20190829,
          20190830,
          20190902,
          20190903,
          20190904,
          20190905,
          20190906,
          20190909,
          20190910,
          20190911,
          20190912,
          20190916,
          20190917,
          20190918,
          20190919,
          20190920,
          20190923,
          20190924,
          20190925,
          20190926,
          20190927,
          20190930,
          20191008,
          20191009,
          20191010,
          20191011,
          20191014,
          20191015,
          20191016,
          20191017,
          20191018,
          20191021,
          20191022,
          20191023,
          20191024,
          20191025,
          20191028,
          20191029,
          20191030,
          20191031,
          20191101,
          20191104,
          20191105,
          20191106,
          20191107,
          20191108,
          20191111,
          20191112,
          20191113,
          20191114,
          20191115,
          20191118,
          20191119,
          20191120,
          20191121,
          20191122,
          20191125,
          20191126,
          20191127,
          20191128,
          20191129,
          20191202,
          20191203,
          20191204,
          20191205,
          20191206,
          20191209,
          20191210,
          20191211,
          20191212,
          20191213,
          20191216,
          20191217,
          20191218,
          20191219,
          20191220,
          20191223,
          20191224,
          20191225,
          20191226,
          20191227,
          20191230,
          20191231,
          20200102,
          20200103,
          20200106,
          20200107,
          20200108,
          20200109,
          20200110,
          20200113,
          20200114,
          20200115,
          20200116,
          20200117,
          20200120,
          20200121,
          20200122,
          20200123,
          20200203,
          20200204,
          20200205,
          20200206,
          20200207,
          20200210,
          20200211,
          20200212,
          20200213,
          20200214,
          20200217,
          20200218,
          20200219,
          20200220,
          20200221,
          20200224,
          20200225,
          20200226,
          20200227,
          20200228,
          20200302,
          20200303,
          20200304,
          20200305,
          20200306,
          20200309,
          20200310,
          20200311,
          20200312,
          20200313,
          20200316,
          20200317,
          20200318,
          20200319,
          20200320,
          20200323,
          20200324,
          20200325,
          20200326,
          20200327,
          20200330,
          20200331,
          20200401,
          20200402
         ]
        }
       ],
       "layout": {
        "annotations": [
         {
          "showarrow": false,
          "text": "Increase Period Begins",
          "x": "2016-12-09",
          "xanchor": "left",
          "xref": "x",
          "y": 0.05,
          "yref": "paper"
         }
        ],
        "shapes": [
         {
          "line": {
           "color": "rgb(30,30,30)",
           "width": 1
          },
          "x0": "2016-12-09",
          "x1": "2016-12-09",
          "xref": "x",
          "y0": 0,
          "y1": 1,
          "yref": "paper"
         }
        ],
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             },
             "pattern": {
              "fillmode": "overlay",
              "size": 10,
              "solidity": 0.2
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             },
             "pattern": {
              "fillmode": "overlay",
              "size": 10,
              "solidity": 0.2
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "pattern": {
              "fillmode": "overlay",
              "size": 10,
              "solidity": 0.2
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "autotypenumbers": "strict",
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "title": {
         "text": "The Great Recession"
        },
        "xaxis": {
         "rangeslider": {
          "visible": false
         }
        },
        "yaxis": {
         "title": {
          "text": "AAPL Stock"
         }
        }
       }
      },
      "text/html": [
       "<div>                            <div id=\"1e2f537e-a041-4582-9def-fddff5585932\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                require([\"plotly\"], function(Plotly) {                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"1e2f537e-a041-4582-9def-fddff5585932\")) {                    Plotly.newPlot(                        \"1e2f537e-a041-4582-9def-fddff5585932\",                        [{\"close\":[14.1,13.74,13.35,13.37,13.54,14.38,14.52,15.12,14.89,14.97,14.94,14.9,14.92,14.99,14.45,14.31,14.65,14.25,14.31,14.27,14.13,14.16,14.45,14.3,14.44,14.58,14.81,14.69,14.55,14.56,14.68,14.45,14.24,14.41,14.84,15.34,15.38,15.18,15.75,15.71,15.9,15.59,16.2,16.25,16.24,16.81,17.22,17.18,16.79,16.7,16.51,16.89,16.42,16.45,16.87,16.88,16.66,16.91,16.43,16.26,16.86,16.92,17.15,16.96,16.89,16.65,16.28,16.33,16.33,16.32,16.34,16.45,16.41,15.85,15.86,15.59,15.8,15.62,15.47,15.49,15.29,15.36,15.45,15.31,15.43,15.6,15.41,15.33,15.66,15.6,16.12,16.13,16.5,16.46,16.55,16.59,16.24,16.4,16.3,16.47,16.63,16.57,16.45,16.87,17.18,17.07,17.15,16.66,16.79,16.69,16.99,16.76,16.52,16.33,16.39,16.45,16.0,16.09,15.54,13.99,14.6,14.63,14.77,14.62,14.5,14.79,14.77,14.65,15.03,15.37,15.2,15.24,15.59,15.58,15.23,15.04,14.99,15.11,14.5,14.79,14.72,14.69,15.39,15.03,14.45,14.76,14.69,14.68,14.52,13.75,13.41,12.71,12.23,12.52,12.15,12.61,12.87,13.06,13.15,12.94,12.8,12.89,12.97],\"high\":[14.19,13.88,13.64,13.46,13.64,14.5,14.85,15.12,15.08,15.22,14.96,15.14,14.94,15.2,14.89,14.45,14.74,14.5,14.48,14.28,14.24,14.39,14.5,14.51,14.5,14.85,14.81,15.0,14.64,14.71,14.78,14.72,14.45,14.48,14.89,15.4,15.47,15.54,15.85,16.04,16.0,15.89,16.23,16.52,16.27,16.95,17.6,17.35,17.44,17.0,17.04,16.97,16.93,16.67,17.0,16.96,17.04,16.93,16.96,16.47,17.0,17.25,17.44,17.26,17.07,17.02,16.53,16.37,16.46,16.48,16.55,16.55,16.48,16.3,15.87,15.92,15.84,15.89,15.64,15.54,15.55,15.43,15.46,15.41,15.48,15.72,15.62,15.38,15.68,15.67,16.12,16.14,16.63,16.66,16.74,16.68,16.68,16.5,16.56,16.48,16.93,16.63,16.63,16.95,17.31,17.34,17.28,17.05,16.93,16.81,17.03,17.27,16.86,16.57,16.55,16.61,16.34,16.16,15.92,14.7,14.66,14.89,14.87,14.69,14.53,14.94,14.82,14.88,15.14,15.37,15.33,15.37,15.62,15.72,15.46,15.13,15.27,15.15,15.04,14.95,14.99,14.78,15.64,15.27,14.73,14.85,14.88,14.84,14.58,14.46,13.97,13.55,12.74,12.68,12.35,12.68,13.07,13.34,13.38,13.04,13.09,13.13,12.97],\"low\":[13.94,13.66,13.27,13.03,13.37,13.85,14.43,14.6,14.74,14.8,14.6,14.78,14.52,14.77,14.38,14.2,14.35,14.15,14.24,14.05,14.08,14.1,14.11,14.25,14.31,14.55,14.62,14.6,14.41,14.46,14.53,14.4,14.18,14.24,14.48,14.93,15.18,15.18,15.19,15.66,15.7,15.57,15.6,16.02,15.99,16.2,16.92,16.82,16.63,16.55,16.43,16.43,16.03,16.23,16.44,16.58,16.48,16.56,16.42,16.24,16.28,16.77,16.79,16.88,16.75,16.64,16.2,16.16,16.06,16.25,16.24,16.23,16.31,15.77,15.63,15.55,15.54,15.49,15.39,15.44,15.18,15.23,15.21,15.21,15.3,15.46,15.35,15.25,15.3,15.53,15.77,15.87,15.98,16.41,16.44,16.44,16.17,16.23,16.24,16.32,16.43,16.1,16.31,16.55,16.92,16.91,16.95,16.63,16.53,16.52,16.61,16.76,16.45,16.2,16.35,16.35,15.93,15.71,15.39,13.99,14.02,14.32,14.51,14.41,14.3,14.56,14.6,14.61,14.7,14.93,15.01,15.08,15.1,15.45,15.15,14.78,14.7,14.89,14.46,14.46,14.63,14.51,14.73,15.02,14.42,14.38,14.62,14.53,13.9,13.75,13.13,12.65,11.91,12.26,11.93,12.27,12.7,12.72,13.08,12.76,12.78,12.82,12.66],\"open\":[14.06,13.77,13.6,13.1,13.49,13.9,14.55,14.61,15.0,15.14,14.64,15.09,14.91,14.92,14.87,14.4,14.37,14.42,14.36,14.26,14.22,14.29,14.15,14.48,14.32,14.56,14.71,14.98,14.6,14.6,14.66,14.7,14.36,14.24,14.48,14.95,15.34,15.47,15.2,15.86,15.85,15.75,15.6,16.1,16.27,16.2,16.97,17.25,17.26,16.9,16.8,16.43,16.91,16.32,16.5,16.78,16.98,16.69,16.8,16.42,16.35,16.98,16.8,17.06,16.93,16.98,16.5,16.29,16.29,16.43,16.39,16.35,16.45,16.3,15.75,15.89,15.64,15.89,15.64,15.47,15.54,15.35,15.3,15.34,15.35,15.47,15.62,15.36,15.38,15.66,15.85,16.12,16.0,16.43,16.55,16.55,16.68,16.23,16.45,16.34,16.53,16.46,16.57,16.65,16.94,17.01,17.13,17.0,16.81,16.79,16.75,16.99,16.79,16.52,16.38,16.43,16.34,15.92,15.92,13.99,14.05,14.59,14.81,14.6,14.51,14.6,14.79,14.71,14.75,15.04,15.33,15.1,15.27,15.49,15.46,15.0,14.77,14.96,14.85,14.55,14.96,14.68,14.8,15.18,14.71,14.38,14.77,14.65,13.9,14.45,13.75,13.41,12.68,12.4,12.0,12.4,12.88,12.78,13.25,12.85,13.05,12.86,12.75],\"type\":\"ohlc\",\"x\":[20190801,20190802,20190805,20190806,20190807,20190808,20190809,20190812,20190813,20190814,20190815,20190816,20190819,20190820,20190821,20190822,20190823,20190826,20190827,20190828,20190829,20190830,20190902,20190903,20190904,20190905,20190906,20190909,20190910,20190911,20190912,20190916,20190917,20190918,20190919,20190920,20190923,20190924,20190925,20190926,20190927,20190930,20191008,20191009,20191010,20191011,20191014,20191015,20191016,20191017,20191018,20191021,20191022,20191023,20191024,20191025,20191028,20191029,20191030,20191031,20191101,20191104,20191105,20191106,20191107,20191108,20191111,20191112,20191113,20191114,20191115,20191118,20191119,20191120,20191121,20191122,20191125,20191126,20191127,20191128,20191129,20191202,20191203,20191204,20191205,20191206,20191209,20191210,20191211,20191212,20191213,20191216,20191217,20191218,20191219,20191220,20191223,20191224,20191225,20191226,20191227,20191230,20191231,20200102,20200103,20200106,20200107,20200108,20200109,20200110,20200113,20200114,20200115,20200116,20200117,20200120,20200121,20200122,20200123,20200203,20200204,20200205,20200206,20200207,20200210,20200211,20200212,20200213,20200214,20200217,20200218,20200219,20200220,20200221,20200224,20200225,20200226,20200227,20200228,20200302,20200303,20200304,20200305,20200306,20200309,20200310,20200311,20200312,20200313,20200316,20200317,20200318,20200319,20200320,20200323,20200324,20200325,20200326,20200327,20200330,20200331,20200401,20200402]}],                        {\"annotations\":[{\"showarrow\":false,\"text\":\"Increase Period Begins\",\"x\":\"2016-12-09\",\"xanchor\":\"left\",\"xref\":\"x\",\"y\":0.05,\"yref\":\"paper\"}],\"shapes\":[{\"line\":{\"color\":\"rgb(30,30,30)\",\"width\":1},\"x0\":\"2016-12-09\",\"x1\":\"2016-12-09\",\"xref\":\"x\",\"y0\":0,\"y1\":1,\"yref\":\"paper\"}],\"template\":{\"data\":{\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"choropleth\"}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"contour\"}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"contourcarpet\"}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmap\"}],\"heatmapgl\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmapgl\"}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2d\"}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2dcontour\"}],\"mesh3d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"mesh3d\"}],\"parcoords\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"parcoords\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}],\"scatter\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatter\"}],\"scatter3d\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatter3d\"}],\"scattercarpet\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattercarpet\"}],\"scattergeo\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattergeo\"}],\"scattergl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattergl\"}],\"scattermapbox\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattermapbox\"}],\"scatterpolar\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterpolar\"}],\"scatterpolargl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterpolargl\"}],\"scatterternary\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterternary\"}],\"surface\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"surface\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}]},\"layout\":{\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"autotypenumbers\":\"strict\",\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]],\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]},\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"geo\":{\"bgcolor\":\"white\",\"lakecolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"showlakes\":true,\"showland\":true,\"subunitcolor\":\"white\"},\"hoverlabel\":{\"align\":\"left\"},\"hovermode\":\"closest\",\"mapbox\":{\"style\":\"light\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"bgcolor\":\"#E5ECF6\",\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\"},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\"},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\"}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"ternary\":{\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"bgcolor\":\"#E5ECF6\",\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"title\":{\"x\":0.05},\"xaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"zerolinewidth\":2},\"yaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"zerolinewidth\":2}}},\"title\":{\"text\":\"The Great Recession\"},\"xaxis\":{\"rangeslider\":{\"visible\":false}},\"yaxis\":{\"title\":{\"text\":\"AAPL Stock\"}}},                        {\"responsive\": true}                    ).then(function(){\n",
       "                            \n",
       "var gd = document.getElementById('1e2f537e-a041-4582-9def-fddff5585932');\n",
       "var x = new MutationObserver(function (mutations, observer) {{\n",
       "        var display = window.getComputedStyle(gd).display;\n",
       "        if (!display || display === 'none') {{\n",
       "            console.log([gd, 'removed!']);\n",
       "            Plotly.purge(gd);\n",
       "            observer.disconnect();\n",
       "        }}\n",
       "}});\n",
       "\n",
       "// Listen for the removal of the full notebook cells\n",
       "var notebookContainer = gd.closest('#notebook-container');\n",
       "if (notebookContainer) {{\n",
       "    x.observe(notebookContainer, {childList: true});\n",
       "}}\n",
       "\n",
       "// Listen for the clearing of the current output cell\n",
       "var outputEl = gd.closest('.output');\n",
       "if (outputEl) {{\n",
       "    x.observe(outputEl, {childList: true});\n",
       "}}\n",
       "\n",
       "                        })                };                });            </script>        </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df = pd.read_excel('C:/Users/zhang/Desktop/4.xlsx',date_parser='trade_date')\n",
    "trace = go.Ohlc(\n",
    "    x=df['trade_date'],\n",
    "    open=df['open'],\n",
    "    high=df['high'],\n",
    "    low=df['low'],\n",
    "    close=df['close']\n",
    ")\n",
    "\n",
    "layout = go.Layout(\n",
    "    title = 'The Great Recession',\n",
    "    # X轴是否显示Rangeslider，默认为True\n",
    "    xaxis = dict(rangeslider = dict(visible=False)),\n",
    "    yaxis = dict(title='AAPL Stock'),\n",
    "    # 添加一条线\n",
    "    shapes = [{\n",
    "        'x0': '2016-12-09', 'x1': '2016-12-09',\n",
    "        'y0': 0, 'y1': 1, \n",
    "        'xref': 'x', 'yref': 'paper',\n",
    "        'line': {'color': 'rgb(30,30,30)', 'width': 1}\n",
    "    }],\n",
    "    annotations = [{\n",
    "        'x': '2016-12-09', 'y': 0.05, \n",
    "        'xref': 'x', 'yref': 'paper',\n",
    "        'showarrow': False, \n",
    "        'xanchor': 'left',\n",
    "        'text': 'Increase Period Begins'\n",
    "    }]\n",
    ")\n",
    "fig = go.Figure(data=[trace],layout=layout)\n",
    "plotly.offline.iplot(fig, filename='simple_candlestick')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d9e7fa38",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
